/*
* Copyright 2017 Yonyou Auto Information Technology（Shanghai） Co., Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project Name : marketing-service-shopping
*
* @File name : ShoppingServiceInterface.java
*
* @Author : Administrator
*
* @Date : 2017年4月19日
*
----------------------------------------------------------------------------------
*     Date       Who       Version     Comments
* 1. 2017年4月19日    Administrator    1.0
*
*
*
*
----------------------------------------------------------------------------------
*/
	
package com.yonyou.gmmc.service.shopping.service;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import org.marketing.common.Response;

/**
*
* @author Administrator
* TODO description
* @date 2017年4月19日
*/

@FeignClient(name="SERVICE-JDINTERFACE" )
public interface ShoppingServiceInterface {
    
    /**
    * 调用京东下单接口
    * @author Administrator
    * TODO description
    * @date 2017年4月19日
    * @param thirdOrder
    * @return
    */
    @RequestMapping(value = "/JDInterface/api/v1/JDOrder", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    Map<String, Object> submitOrder(Map<String, Object> queryMap);
    
    /**
     * 调用京东取消未确认订单接口
     * @param jdOrderId
     * @return
     */
     @RequestMapping(value = "/JDInterface/api/v1/cancelJDOrder", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
     Response<List<Map<String,Object>>> cancelOrder(String jdOrderId);
     
     /**
      * 调用京东商品区域购买限制查询接口
      * @param params
      * @return
      */
      @RequestMapping(value = "/JDInterface/api/v1/checkAreaLimit", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
      Response<List<Map<String,Object>>> checkAreaLimit(Map<String, Object> params);
      /**
       * 批量获取库存接口（建议订单详情页、下单使用）
       * @param params
       * @return
       */
       @RequestMapping(value = "/JDInterface/api/v1/getNewStockById", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
       Response<List<Map<String,Object>>> getNewStockById(Map<String, Object> params);
       /**
        * 批量获取库存接口(建议商品列表页使用)
        * @param params
        * @return
        */
        @RequestMapping(value = "/JDInterface/api/v1/getStockById", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
        Response<List<Map<String,Object>>> getStockById(Map<String, Object> params);
        
        /**
        *  校验JD地址
        * @author Administrator
        * TODO description
        * @date 2017年4月28日
        * @param thirdOrder
        * @param cityId
        * @param countyId
        * @param townId
        * @return
        */
        @RequestMapping(value = "/JDInterface/api/v1/checkFourAdd", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
        Response<List<Map<String,Object>>> checkFourAdd(Map<String, Long> params);
        
        /**
         * 统一余额查询
         * @param params
         * @return
         */
        @RequestMapping(value = "/JDInterface/api/v1/getBalance", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
        Response<List<Map<String,Object>>> getBalance(Map<String, Integer> params);
        
        /**
         * 查询用户金彩余额
         * @param params
         * @return
         */
        @RequestMapping(value = "/JDInterface/api/v1/selectJincaiCredit", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
        Response<Map<String,Object>> selectJincaiCredit();
}
